<template>
  <wl-list class="wl-content-container" :listData="myState" @pageChange="pageChange" @sizeChange="sizeChange">
    <wl-query slot="query"  :needAdv="false" @doQuery="doQuery">
      <template slot="main">
          <el-form :model="mainData" class="form-query"  label-width="80px" >
            <wl-form-item :importance="false"  label="模板名称" prop="name" :itemData="mainData">
              <wl-input slot="input" slot-scope="col" class="wl-input-item" :rawData="col.columnData" field="name" placeholder="请输入域名网址"></wl-input>
            </wl-form-item>
            <wl-form-item :importance="false"  label="状态" prop="status" :itemData="mainData">
              <wl-select slot="input" slot-scope="col" type="status" :code="feature_code" :rawData="col.columnData"></wl-select>
            </wl-form-item>
          </el-form>
      </template>
    </wl-query>
    <wl-container slot="operator" align="right">
      <wl-tip-button icon="btn_xz1" :isNew="true" tipsDisabled @click="doNew" label="新增"></wl-tip-button>
      <wl-tip-button icon="btn_qy" btnType="" :isNormal="true"  :disabled="!isQiYong" :tipsDisabled="false" @click="doQiYong" tips="停用状态下可以启用" label="启用"></wl-tip-button>
      <wl-tip-button icon="btn_ty" btnType="" :isNormal="true"  :disabled="!isTingYong" :tipsDisabled="false" @click="doTingYong" tips="启用状态下可以停用" label="停用"></wl-tip-button>
    </wl-container>
    <el-table  slot="table" :row-class-name="rowClassName" :data="myState.data_list" style="width: 100%" border stripe @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="40"></el-table-column>
      <!-- <el-table-column type="expand">
       <template slot-scope="props">
        <el-form label-position="left" inline class="demo-table-expand">
          <el-form-item  v-for="(item,key) in props.row" :key="key" :label="key">
            <span>{{ props.row[key] }}</span>
          </el-form-item>
        </el-form>
      </template>
      </el-table-column> -->
      <el-table-column label="操作" width="120" class-name="operation_cell">
        <template slot-scope="scope">
          <wl-tip-button icon="btn_xq"  tips="查看" @click="rowEdit(scope.$index, scope.row)"></wl-tip-button>
        </template>
      </el-table-column>
      <el-table-column prop="status" label="状态">
        <template slot-scope="scope">
         <wl-status type="use_status" :label="scope.row.status"></wl-status>
        </template>
      </el-table-column>
      <el-table-column prop="bind_status" label="绑定状态">
        <template slot-scope="scope">
         <wl-status type="bind_status" :label="scope.row.bind_status"></wl-status>
        </template>
      </el-table-column>
      <el-table-column prop="name" label="名称"></el-table-column>
      <el-table-column prop="bind_business" label="绑定业务">
        <template slot-scope="scope">
         <wl-status type="audit_model" :label="scope.row.bind_business"></wl-status>
        </template>
      </el-table-column>
    </el-table>
  </wl-list>
</template>
<script lang="ts" src="./audit_template.ts"></script>
<style>
.el-table__row.selected_row,
.el-table__body tr.el-table__row--striped.selected_row td,
.el-table__row.el-table__row--striped.selected_row {
  background-color: #e6f0fb;
  color: #439eff;
}

.el-table__row.selected_row:hover,
.el-table__body tr.el-table__row--striped.selected_row td:hover,
.el-table__row.el-table__row--striped.selected_row:hover {
  background-color: #eef1f6;
}
</style>

